/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cqcis.uip.base.framework.core.impl;

import java.util.List;

import com.cqcis.uip.base.framework.codec.ObjectDecoder;
import com.cqcis.uip.base.framework.codec.ObjectEncoder;
import com.cqcis.uip.base.framework.common.Role;
import com.cqcis.uip.base.framework.core.ServiceRole;
import com.cqcis.uip.base.framework.filters.Filter;
import com.cqcis.uip.base.framework.handlers.BeforeService;
import com.cqcis.uip.base.framework.handlers.ServerService;

/**
 * 描述socket服务端应该具有的组件
 * 
 * @author huangmy
 * @date 2008-3-28
 */
@ServiceRole(Role.SOCKET_SERVER)
public class AcceptorServiceAdaptor {
	private BeforeService beforeService;// 生成日志记录ID
	private ObjectDecoder objectDecoder; // 读数据解码器
	private ObjectEncoder objectEncoder; // 写数据编码器
	private List<Filter> readFilters;// 读数据过滤器
	private List<Filter> writeFilters;// 写数据过滤器
	private ServerService service; // 服务层, 如果不为空, 则用默认的handler
	private boolean defaultStreamRecord = true; // 是否记录字节流
	
	public BeforeService getBeforeService() {
		return beforeService;
	}

	public void setBeforeService(BeforeService beforeService) {
		this.beforeService = beforeService;
	}

	public ObjectDecoder getObjectDecoder() {
		return objectDecoder;
	}

	public void setObjectDecoder(ObjectDecoder decoder) {
		this.objectDecoder = decoder;
	}

	public ObjectEncoder getObjectEncoder() {
		return objectEncoder;
	}

	public void setObjectEncoder(ObjectEncoder encoder) {
		this.objectEncoder = encoder;
	}

	public List<Filter> getReadFilters() {
		return readFilters;
	}

	public void setReadFilters(List<Filter> readFilters) {
		this.readFilters = readFilters;
	}

	public List<Filter> getWriteFilters() {
		return writeFilters;
	}

	public void setWriteFilters(List<Filter> writeFilters) {
		this.writeFilters = writeFilters;
	}

	public ServerService getService() {
		return service;
	}

	public void setService(ServerService service) {
		this.service = service;
	}

	public boolean isDefaultStreamRecord() {
		return defaultStreamRecord;
	}

	public void setDefaultStreamRecord(boolean defaultStreamRecord) {
		this.defaultStreamRecord = defaultStreamRecord;
	}
}
